package priv.ln._interface.exer;

/**
 * ClassName: DeveloperTest
 * Package: priv.ln._interface.exer
 * Description:
 *
 * @Author 辣辣
 * @Create 2024/7/9 19:08
 * @Version 1.0
 */
public class DeveloperTest {
    public static void main(String[] args) {
        Developer developer = new Developer();
        Vehicle[] vehicles = new Vehicle[3];
        vehicles[0] = new Bicycle("捷安特","白色");
        vehicles[1] = new Car("奔驰","黑色","冀B-54K54");
        vehicles[2] = new ElectricVehicle("雅迪","绿色");

        for (int i = 0; i < vehicles.length; i++) {
            developer.takingVehicle(vehicles[i]);
            if (vehicles[i] instanceof IPower) {
                ((IPower) vehicles[i]).power();
            }

        }
    }
}
